#include "king.h"

#include <QList>

King::King(Cell *cell, QString color, QWidget *parent): Piece(cell, color, parent){
    loadPieceImage(color + "king");
    cell->setPiece(this);
}

QList<Cell *> King::getTips(Board *board)
{
    QList<Cell *> tips;
    Cell *c;
    for (int i=-1; i<=1; i++) {
        for (int j=-1; j<=1;j++){
            c = isMove(i, j, board);
            tips << c;
        }
    }

    return tips;
}
